<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>登录--后台管理</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	<link rel="stylesheet" href="${ctxPath}/layui/css/layui.css" media="all" />
	<link rel="stylesheet" href="${ctxPath}/assets/css/login.css" media="all" />
</head>
<body>
	<video class="video-player" preload="auto" autoplay="autoplay" loop="loop" data-height="1080" data-width="1920" height="1080" width="1920">
	    <source src="${ctxPath}/assets/i/login.mp4" type="video/mp4">
	</video>
	<div class="video_mask"></div>
	<div class="login">
	    <h1>${session.companyName!}-后台管理</h1>
	    <form class="layui-form" method="post">
	    	<div class="layui-form-item">
				<input class="layui-input" name="username" placeholder="用户名" lay-verify="required" type="text" autocomplete="off">
		    </div>
		    <div class="layui-form-item">
				<input class="layui-input" name="password" placeholder="密码" lay-verify="required" type="password" autocomplete="off">
		    </div>
			<button id="sub" class="layui-btn login_btn"  >登录</button>
		</form>
	</div>
	
	<!--[if (gte IE 9)|!(IE)]><!-->
<script src="${ctxPath}/assets/js/jquery.min.js"></script>
<!--<![endif]-->
	
	<script type="text/javascript" src="${ctxPath}/layui/layui.js"></script>
	<!-- <script type="text/javascript" src="${ctxPath}/assets/js/login.js"></script> -->
	
	<!-- ajax提交表单 -->
	<script src="${ctxPath}/assets/js/jquery.form.min.js"></script>
	<script type="text/javascript">
	
	layui.use('layer', function(){ //独立版的layer无需执行这一句
		  var $ = layui.jquery, layer = layui.layer; //独立版的layer无需执行这一句
		  
		  
		  
		$("#sub").click(function() {
			
			//加载层-默认风格
			layer.load();
			
			//此处演示关闭
			setTimeout(function(){
			  layer.closeAll('loading');
			}, 500);
			
			$(".layui-form").ajaxSubmit({
				success : function(data) {
					if (data.errorCode != "0") {
						
						
						layer.msg(data.errorMsg, function(){
							//关闭后的操作
						});
						console.log(data.errorMsg);
						
						
						return;
					}
					 //跳转页面
					window.location.href="${ctxPath}/index"; 
				}
			})
			//防止表单自动提交
			return false;
		})
	});
	</script>
	
</body>
</html>